From: Joey Hess Date: Tue, 4 Mar 2025 16:51:38 +0000 (-0400) Subject: update location log after getting input file from remote X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~6^2~119^2~11 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f4e0d6a04372872608951632710e97ec762879ea;p=git-annex.git update location log after getting input file from remote --- diff --git a/Remote/Compute.hs b/Remote/Compute.hs index e4051bc877..9e821ff9eb 100644 --- a/Remote/Compute.hs +++ b/Remote/Compute.hs @@ -39,6 +39,7 @@ import Annex.Content import Annex.Tmp import Annex.GitShaKey import Annex.CatFile +import Annex.RepoSize.LiveUpdate import qualified Annex.Transfer import Logs.MetaData import Logs.EquivilantKeys @@ -513,17 +514,19 @@ computeKey rs (ComputeProgram program) k _af dest p vc = getinputcontent' f inputkey = do remotelist <- Annex.getState Annex.remotes locs <- loggedLocations inputkey - rs <- keyPossibilities' (IncludeIgnored False) inputkey locs remotelist - if null rs + remotes <- keyPossibilities' (IncludeIgnored False) inputkey locs remotelist + if null remotes then return () - else void $ firstM (getinputcontentfrom f inputkey) rs + else void $ firstM (getinputcontentfrom f inputkey) remotes -- TODO cycle prevention getinputcontentfrom f inputkey r = do showAction $ "getting input " <> QuotedPath f <> " from " <> UnquotedString (name r) - Annex.Transfer.download r inputkey (AssociatedFile (Just f)) - Annex.Transfer.stdRetry Annex.Transfer.noNotification + lu <- prepareLiveUpdate Nothing inputkey AddingKey + logStatusAfter lu inputkey $ + Annex.Transfer.download r inputkey (AssociatedFile (Just f)) + Annex.Transfer.stdRetry Annex.Transfer.noNotification computeskey state = case M.keys $ M.filter (== Just k) (computeOutputs state) of